
\documentclass[a4paper, 11pt]{article}

\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{layout}
\addtolength{\hoffset}{-1.0cm} \addtolength{\textwidth}{2cm}
\addtolength{\voffset}{-1.0cm} \addtolength{\textheight}{2cm}
\usepackage{appendix} %生成附录

\usepackage{cite}
\makeatletter
\def\@cite#1#2{\textsuperscript{[{#1\if@tempswa , #2\fi}]}}
\makeatother

\usepackage{appendix} %生成附录
\usepackage{flushend, cuted} %

\usepackage{indentfirst,latexsym,bm}
\usepackage{amsmath,amssymb,amsfonts}
\usepackage{pifont}
\usepackage{CJK}
\usepackage[rgb]{xcolor}
\usepackage[dvips]{graphicx}
\usepackage{subfigure}
\usepackage{url}
\usepackage{mathrsfs}
\usepackage{caption}


\usepackage[dvipdfm, %,pdftex这里决定运行文件的方式不同
                  pdfstartview=FitH,
                  CJKbookmarks=true,
                  bookmarksnumbered=true,
                  bookmarksopen=true,
                  colorlinks, %注释掉此项则交叉引用为彩色边框(将colorlinks和pdfborder同时注释掉)
                  pdfborder=001, %注释掉此项则交叉引用为彩色边框
                  linkcolor=black,
                  anchorcolor=green,
                  citecolor=green
                  ]{hyperref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \href{url}{text}                           %
% \url{url}                                  %
% \nolinkurl{url}                            %
% \hyperbaseurl{url}                         %
% \hyperimage{imageurl}{text}                %
% \hyperdef{category}{name}{text}            %
% \hyperref{url}{category}{name}{text}       %
% \hyperref{label}{text}                     %
% \hyperlink{name}{text}                     %
% \hypertarget{name}{text}                   %
% \phantomsection                            %
% \addcontentsline{toc}{chapter}{\indexname} %
% \printindex                                %
% \autoref{label}                            %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings}
\lstset{basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\tiny,
keywordstyle=\color{blue!70}, commentstyle=\color{red!50!green!50!blue!50},
frame=shadowbox,
rulesepcolor=\color{red!20!green!20!blue!20},
escapeinside=``, xleftmargin=2em,xrightmargin=2em, aboveskip=1em,
language=C++, keywordstyle=\color{blue!70},  frame=shadowbox, rulesepcolor=\color{red!20!green!20!blue!20}
}
\lstset{extendedchars=false}


\setlength{\columnsep}{3em}          %设置分栏间隔
\setlength{\parindent}{2em}          %设置段首缩进量
\renewcommand{\baselinestretch}{1.2} %重设行距       \usepackage{graphicx}
\newcommand{\lishu}[1]{   \CJKfamily{li}   {#1}}   %隶书\renewcommand*\fuigurename{\KAI{图}}
\newcommand{\heiti}[1]{  \CJKfamily{hei}  {#1}}   %黑体
\newcommand{\kaiti}[1]{  \CJKfamily{kai}  {#1}}   %楷体\usepackage{cite}
\newcommand{\red}[1]{  \textcolor{red}  {#1}}   %红色\makeatletter
\newcommand{\blue}[1]{ \textcolor{blue} {#1}}   %蓝色\def\@cite#1#2{\textsuperscript{[{#1\if@tempswa , #2\fi}]}}
\newcommand{\green}[1]{\textcolor{green}{#1}}   %绿色\makeatother

\newcommand{\KAI}[1]{\begin{CJK*}{UTF8}{kai}{#1}\end{CJK*}}
\newcommand{\HEI}[1]{\begin{CJK*}{UTF8}{hei}{#1}\end{CJK*}}
\newcommand{\LI}[1]{\begin{CJK*}{UTF8}{li}{#1}\end{CJK*}}
\newcommand{\SONG}[1]{\begin{CJK*}{UTF8}{song}{#1}\end{CJK*}}
\newcommand{\YOU}[1]{\begin{CJK*}{UTF8}{you}{#1}\end{CJK*}}
\newcommand{\FSONG}[1]{\begin{CJK*}{UTF8}{fsong}{#1}\end{CJK*}}
%----------------------------------------------------------------
\vfuzz2pt % Don't report over-full v-boxes if over-edge is small
\hfuzz2pt % Don't report over-full h-boxes if over-edge is small

%%--------------------------------------------------
%% 图片文件路径
%%--------------------------------------------------


% MATH -----------------------------------------------------------
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\rank}{rank}
\DeclareMathOperator{\vecm}{vec}
\DeclareMathOperator{\vecs}{vecs}

\newcommand{\mfloor}[1]{ \left\lfloor {#1} \right\rfloor }
\newcommand{\mpair}[2]{ \left\langle {#1}, {#2} \right\rangle}


\renewcommand{\bf}[1]{\mathbf{#1}}
%\renewcommand{\vec}[1]{\bm{#1}}    %向量， 黑斜体
\newcommand{\mat}[1]{\bm{#1}}    %矩阵
\newcommand{\dif}{\mathrm{d}}
\newcommand{\diver}{\mathrm{div}}
\newcommand{\me} {\mathrm{e}}
\newcommand{\mi} {\mathrm{i}}

\newcommand{\vecmat}[1]{\vecm{\left( #1 \right)}}
\newcommand{\vecsmat}[1]{\vecs{\left( #1 \right)}}
\newcommand{\vecasym}[1]{[#1]_\times}   % antisymmetric matrix from a vector
\newcommand{\id} {\mathbbm{1}}   % identity operator
\newcommand{\fracode}[2]{\frac{\dif {#1}}{\dif {#2}}}         % ordinary differential operator
\newcommand{\fracpde}[2]{\frac{\partial {#1}}{\partial {#2}}} % partial differential operator
\newcommand{\fracpderow}[2]{\partial {#1}/\partial {#2}}
\newcommand{\fracoderow}[2]{\dif {#1}/\dif {#2}}
\newcommand{\fracpdemix}[3]{\frac{\partial^2 {#1}}{\partial {#2} \partial {#3}}}
\newcommand{\lap}[2]{\frac{\partial^2 {#1}}{\partial {#2}^2}}
\newcommand{\laprow}[2]{\partial^2 {#1}/\partial {#2}^2}
\newcommand{\secode}[2]{\frac{\dif^2 {#1}}{\dif {#2}^2}}
\newcommand{\set}[1]{\left\{ #1 \right\}}
\newcommand{\abs}[1]{\left| #1 \right|}
\newcommand{\absvec}[1]{\left| \bf{#1} \right|}
\newcommand{\ket}[1]{|#1 \rangle}
\newcommand{\bra}[1]{\langle #1 |}
\newcommand{\braket}[2]{ \langle #1 | #2 \rangle}
\newcommand{\norm}[1]{\lVert #1 \rVert}
\newcommand{\normF}[1]{{\parallel #1 \parallel}_\textrm{F}}
\newcommand{\tA}[1]{{#1}^\textsf{T}}
\newcommand{\inv}[1]{#1^{-1}}
\newcommand{\ginv}[1]{#1^+}    % Moore-Penrose (general) inverse
\newcommand{\tinv}[1]{{#1}^{-\textsf{T}}}


\newcommand{\ES}[3]{\mathbb{#1}^{{#2}\times {#3}}}               % Euclidean space
\newcommand{\PS}[3]{\mathbb{#1}^{{#2}\times{#3}}}      % projective space
% ----------------------------------------------------------------



\begin{document}
\begin{CJK*}{UTF8}{song}

%%*********************************************
%% 设置页眉与页脚
%%*********************************************

\pagestyle{fancy}
\fancyhead[LO,RE]{Ubuntu13.04\,安装\,64\,位\,MATLAB2013a} % clear all fields
\fancyhead[RO,LE]{ABSR-ER-No.001}   %  请设置正确的个人文档编号
%\fancyhead[LO,RE]{\CJKfamily{hei>} \bfseries \leftmark}
%\fancyfoot[LE,RO]{\thepage}
\fancyfoot[RO,LE]{中欧航空工程师学院}
\fancyfoot[LO,RE]{SIAE}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}



% THEOREMS -------------------------------------------------------
\newtheorem{thm}{\textcolor[rgb]{0.98,0.00,0.00}{定理}}
\newtheorem{cor}[thm]{\textcolor[rgb]{0.00,0.00,1.00}{推论}}
\newtheorem{lem}[thm]{\textcolor[rgb]{0.00,0.00,1.00}{引理}}
\newtheorem{prop}[thm]{\textcolor[rgb]{0.00,0.00,1.00}{性质}}
\newtheorem{prob}[thm]{\textcolor[rgb]{0.98,0.00,0.00}{问题}}
\newtheorem{conj}[thm]{\textcolor[rgb]{1.00,0.00,1.00}{猜想}}
\newtheorem{defn}[thm]{\textcolor[rgb]{0.44,0.00,0.87}{定义}}
\newtheorem{rem}[thm]{\textcolor[rgb]{1.00,0.50,0.25}{注记}}
\newtheorem{eg}[thm]{\textcolor[rgb]{0.00,0.00,1.00}{例}}%[chapter]

\renewcommand{\contentsname}{\hfil 目\quad 录}
\renewcommand{\figurename}{\kaiti{图}}
\renewcommand{\refname}{\kaiti{参考文献}}
\setcounter{figure}{0}


\title{\heiti{Ubuntu13.04\,安装\,64\,位\,MATLAB2013a\\ ABSR-ER-No.001}}
\author{\kaiti{王子昊}(Zi-Hao Wang)\\
               个人代号: ABSR-03,  电子邮件: zhwang0721@gmail.com }

\date{2014~年~03~月~02~日}


%%*************************************************
%%  打印 标题, 作者, 日期等内容
%%*************************************************
\maketitle       %
\tableofcontents
\pagenumbering{roman}
%%*************************************************
%% 显示内容目录
%%*************************************************
\newpage
\pagenumbering{arabic}
%%*************************************************
%% 正文部分
%%*************************************************
\section{说明}
\subsection{引用博客申明}
本文采用的教程及镜像文件种子来源于:\par
\href{http://blog.sbw.so/Article/index/Ftitle/64%E4%BD%8DLinux%E5%AE%89%E8%A3%85Matlab-2013a%E5%AE%9E%E7%94%A8%E6%95%99%E7%A8%8B.html}{\textcolor[rgb]{0.00,0.00,1.00}{64位Linux安装MatlabR2013a实用教程}}\par
以及\par
\href{http://panda0411.diandian.com/post/2011-02-27/17539910}{\textcolor[rgb]{0.00,0.00,1.00}{Matlab~for~Linux中文乱码}}
\subsection{环境说明}
系统版本：Ubuntu13.04~~64位\par
内核版本：linux-3.8.0-35-generic\par
MATLAB版本：R2013a (8.1.0.604)

\section{获取安装文件}
首先获得种子文件：\par
\href{http://download.sbw.so/Mathworks_Matlab_R2013a_Linux_MacOS_x64.torrent}{\textcolor[rgb]{0.00,0.00,1.00}{Mathworks~Matlab~R2013a~Linux~MacOS~x64.torrent}}
\par 然后，使用种子文件把镜像文件\verb|“Matlab801_MacUnix.iso”|下载下来。

\section{安装步骤}
\subsection{挂载镜像文件}
打开终端，切换到镜像文件所在的目录：
\par \verb|$ cd /home/regis/下载 |
\par 新建文件夹：
\par \verb|$ mkdir matlabTmp |
\par 挂载镜像到新建的文件夹：
\par \verb|$ sudo mount -o loop Matlab801_MacUnix.iso matlabTmp |
\subsection{执行安装脚本}
切换到镜像挂载的文件夹
\par \verb|$ cd matlabTmp|
\par 执行安装脚本，会自动将MATLAB安装到\verb| /usr/local |中
\par \verb|$ ./install_auto_linux |
\section{快捷方式}
将镜像中的快捷方式复制到系统软件快捷方式的文件夹中
\par \verb|$ sudo cp Matlab.desktop /usr/share/applications |
\section{解决中文字符无法显示的问题}
提示：如果系统中没有中文字符可以跳过此步骤。
\subsection{生成字体}
进入MATLAB的JAVA文件夹
\par \verb|$ cd /usr/local/MATLAB/R2013a/sys/java/jre/glnxa64/jre/lib/fonts|
\par 新建一个文件夹
\par \verb|$ sudo mkdir fallback |
\par 把系统自带的中文字体“文泉驿正黑”复制到新建的文件夹，
\par \verb|$ sudo cp /usr/share/fonts/truetype/wpy/wqy-zenhei.ttc fallback|
\par 进入新建的文件夹
\par \verb|$ cd fallback |
\par 运行命令，会生成一个“fonts.scale”文件
\par \verb|$ sudo mkfontscale |
\par 为文件“fonts.dir”增加可写属性
\par \verb|$ sudo chmod +w fonts.dir |
\par 回到上级文件夹
\par \verb|$ cd .. |
\par 将刚刚产生的“fonts.scale”文件内容增加到“fonts.dir”文件中
\par \verb|$ sudo bash -c "cat fallback/fonts.scale >> fonts.dir" |
\subsection{MATLAB字体设置}
打开MATLAB2013a，依次点击“Preferences”“Fonts”将字体设为“WenQuanYi Zen Hei”。
\par
\vspace{1em}
至此，MATLAB安装完毕。

\newpage
\end{CJK*}
\end{document}
